package com.jiangyg.mall.order.dto;

import com.jiangyg.mall.core.support.validation.constraints.Enum;
import com.jiangyg.mall.order.enums.PayType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 类描述：订单提交参数
 *
 * @author jiangyg
 * @version 4.0
 * @date 2022-12-09
 */
@Data
@EqualsAndHashCode
@NoArgsConstructor
public class OrderSubmitDTO implements Serializable {

    private static final long serialVersionUID = -5810197763643494053L;

    /**
     * 令牌
     */
    @NotNull
    private String token;

    /**
     * 支付方式【1->支付宝；2->微信；3->银联； 4->货到付款；】
     */
    @NotNull
    @Enum(PayType.class)
    private int payType;

    /**
     * 订单备注
     */
    private String remark;

    /**
     * 支付价格
     */
    @NotNull
    private double payPrice;

    /**
     * 收货地址ID
     */
    @NotNull
    private Long receiveAddressId;

}
